

<div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
        <h3><?php echo $School->name; ?></h3>
</div>

    <div class="modal-body">
                
        <div class="control-group">
            <label class="control-label">学院名称</label>
            <div class="controls">
                <input type="text" class="m-wrap large" name="School[name]" value="<?php echo $School->name; ?>" id="School_add_name">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">地区</label>
            <div class="controls">
                <?php echo  CHtml::dropDownList('School[add_prov_id]',$School->prov_id,CHtml::listData(Area::model()->findAllByAttributes(array('grade'=>1)),'id', 'name'))
                ?>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label">学院类型</label>
            <div class="controls">
                <?php echo  CHtml::dropDownList('School[add_type_id]','$School->type_id',CHtml::listData(Type::model()->findAllByAttributes(array('sign'=>1)),'id', 'name'))
                ?>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label">学院首字母</label>
            <div class="controls">
                <input type="text" class="m-wrap small" name="School[initials]" maxlength="1" value="<?php echo $School->initials; ?>" id="School_add_initials">
            </div>
        </div>
                
    </div>
            <p id='error-info'></p>  
             
              <div class="modal-footer">
            
            <?php
echo CHtml::ajaxSubmitButton('确定修改',Yii::app()->createUrl(Yii::app()->params['adminUrl'].'/college/edit'),
                    array(  
                        'type'=>'POST',                     
                       'data' => 'js:{"School_initials":$("#School_add_initials").val(),"School_name":$("#School_add_name").val(),"School_prov_id":$("#School_add_prov_id").val(),"School_type_id":$("#School_add_type_id").val(),"School_id":'.$School->id.'}',
                        
                        
                        
                        'success'=>'js:function(data){ 
                            if(data==1){
                                   alert("学院修改成功！");
                                  // $("#table-school").yiiGridView("update");
                                      parent.location.reload();
                            } 
                            else{
                                   alert("修改失败!");
                                   $("#error-info").html(data);
                                  // $("#table-school").yiiGridView("update");
                                  $("#edit").modal("hide");
                            }
                        }',   
                        'error'=>'js:function(){alert("修改失败");$("#table-school").yiiGridView("update");}'
                    ),array('class'=>'btn btn-info','id'=>'edit_sumbit'));
                ?>
                  
                  
                
        <?php
           $this->widget('bootstrap.widgets.TbButton', array(
               'label' => 'Close',
               'url' => 'javascript::;',
               'htmlOptions' => array('data-dismiss'=>'modal','id'=>'close-payment'),
           ));
           ?> 
            </div>

            
   
<script type="text/javascript">




$("#School_add_initials").blur(function() {
    $(this).val($(this).val().toUpperCase());
});





function colse(divid){
  //var a=$('#table-user-prepaid_c0_0').val();
    $('#edit').modal('hide');
}



</script>